#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
typedef int Datatype;
class Stack
{
public:
    Stack(int capacity=4)
    {
        //long long* ch = new long long[0xfffffffff];
         _a= new Datatype[capacity];
        _capacity = _top = 0;
    }
    void PushBack(Datatype x)
    {
        _a[_top++] = x;
    }
    ~Stack()
    {
        delete[]_a;
        _capacity = _top = 0;
    }
private:
    Datatype* _a;
    int _capacity;
    int _top;
};
Stack* func()
{
    int n;
    cin >> n;
    Stack* pst = new Stack(10);
    return pst;
}
//int main()
//{
//    Stack* ptr = func();
//    ptr->PushBack(1);
//    ptr->PushBack(2);
//    ptr->PushBack(3);
//
//    delete ptr;
//    return 0;
//}
void func1()
{
    //long long* ch = new long long[0xfffffffff];
    //cout << (void*)ch << endl;
    Stack();
}
int main()
{
    //char* ch = new char[1000000000];
    try
    {
        func1();
    }
    catch (const exception& p)
    {
         cout << p.what() << endl;
    }
    return 0;
}